home *** CD-ROM | disk | FTP | other *** search
- Path: isonews.bbn.hp.com!hpbblb!news
- From: Matthias Dittrich <matti>
- Newsgroups: comp.lang.c
- Subject: Re: Newbie doesn't understand compiler error
- Date: 26 Mar 1996 17:21:32 GMT
- Organization: Hewlett-Packard Co.
- Message-ID: <4j992s$gcr@hpbblb.bbn.hp.com>
- References: <Pine.SUN.3.91.960301153010.11258B-100000@pioneer.uspto.gov> <4hoffl$l74@aphex.direct.ca> <4irlub$jtn@winx03.informatik.uni-wuerzburg.de>
- NNTP-Posting-Host: trabant.bbn.hp.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.07 9000/712)
- X-URL: news:4irlub$jtn@winx03.informatik.uni-wuerzburg.de
-
- schoof@informatik.uni-wuerzburg.de (Jochen Schoof) wrote:
- >Ed Toivanen (etoivane@direct.ca) wrote:
- >:
- >: >
- >: >main( int argv, char *argc[] ) <<- Compiler states "Syntax error at or near
- >:
- >: Try
- >: main(int argc, char* argv[])
- >:
- >: That should fixn things up.
- >
- >I don't see why. If the program does not compile with the given
- >definition it most likely won't do so either with your suggestion.
- >The names of variables can be chosen arbitrarily - even for the
- >parameters of main(). Using argc as the argument counter and
- >argv as the pointer to the arguments is sort of convention, but
- >not required by the standard. Interchanging these two is not the
- >best idea but however legal C.
- >
- May be you have no ANSI-C compiler. Then try:
- int main(argc, argv)
- int argc;
- char *argv[];
-
- Good luck,
- Matthias
-
-